'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
  //event为客户端上传的参数
  console.log(event)
  let res={
	 success: false,
	 message: '请求失败',
	 data:{},
  }
  const converdb = db.collection('conver')
  let data_con = await converdb.where({
  	day_id: event.data._id
  }).get()
  if(data_con.data[0]){
	   res={
	  	 success: true,
	  	 message: '请求成功',
		 code:'0000',
	  	 data:data_con.data[0],
	  }
  }
  //返回数据给客户端
  return res
};
